package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 病种扩展属性实体
 *
 * @author niule
 */
@Entity
@Table(name = "fus_disease_extend_property")
public class DiseaseExtendPropertyEntity {
    private Long extendId;
    private Long diseaseTypeId;
    private String name;
    private Long parentId;
    private String viewDispFlag;
    private String optGroupFlag;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date createTime;

    @Id
    @Column(name = "extendId")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getExtendId() {
        return extendId;
    }

    public void setExtendId(Long extendId) {
        this.extendId = extendId;
    }

    @Basic
    @Column(name = "disease_type_id")
    public Long getDiseaseTypeId() {
        return diseaseTypeId;
    }

    public void setDiseaseTypeId(Long diseaseTypeId) {
        this.diseaseTypeId = diseaseTypeId;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "parentId")
    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Basic
    @Column(name = "optGroupFlag")
    public String getOptGroupFlag() {
        return optGroupFlag;
    }

    public void setOptGroupFlag(String optGroupFlag) {
        this.optGroupFlag = optGroupFlag;
    }

    @Basic
    @Column(name = "viewDispFlag")
    public String getViewDispFlag() {
        return viewDispFlag;
    }

    public void setViewDispFlag(String viewDispFlag) {
        this.viewDispFlag = viewDispFlag;
    }

    @Basic
    @Column(name = "createTime")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DiseaseExtendPropertyEntity that = (DiseaseExtendPropertyEntity) o;
        return extendId.equals(that.extendId) &&
                Objects.equals(diseaseTypeId, that.diseaseTypeId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(parentId, that.parentId) &&
                Objects.equals(optGroupFlag, that.optGroupFlag) &&
                Objects.equals(viewDispFlag, that.viewDispFlag) &&
                Objects.equals(createTime, that.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(extendId, diseaseTypeId, name, parentId, optGroupFlag, viewDispFlag, createTime);
    }
}
